home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
- #include <exec/execbase.h>
- #include <dos/dos.h>
- #include <clib/icon_protos.h>
- #include <clib/exec_protos.h>
- #include <clib/dos_protos.h>
-
- #include <string.h>
-
- extern struct ExecBase *SysBase;
- struct Library *IconBase;
-
- int main(int argc, char *argv[])
- {
- int retcode = RETURN_OK;
-
- if (SysBase->SoftVer < 37)
- { Write(Output(),"OS 2.04 nötig\n",14);
- return RETURN_FAIL;
- }
-
- if ((argc != 2) || (strcmp(argv[1],"?")==0))
- { Printf("Aufruf: %s Dateiname/A\n",(long)argv[0]);
- return RETURN_WARN;
- }
-
- if (IconBase = OpenLibrary("icon.library",37))
- { if (!DeleteDiskObject(argv[1]))
- { /* Aktion fehlgeschlagen */
- PrintFault(IoErr(),argv[0]);
- retcode = RETURN_FAIL;
- }
- CloseLibrary(IconBase);
- }
-
- return retcode;
- }
-